// 笔试强训day31:春游

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int T = 0; cin >> T;
    while(T--)
    {
        long long n, a, b; cin >> n >> a >> b;
        long long cost = 0;
        if(a * 3 < b * 2)
        {
            cost = n / 2 * a;
            if(n % 2 != 0)
            {
                if(cost != 0)
                    cost += min(b - a, min(a, b));
                else
                    cost += min(a, b);
            }
        }
        else 
        {
            cost = n / 3 * b;
            if(n % 3 == 1 && cost != 0)
                cost += min(2 * a - b, min(a, b));
            else if(n % 3 == 2)
                cost += min(a, b);
        }
        cout << cost << endl;
    }
}